import { ApiProperty } from "@nestjs/swagger";
import { IsOptional, IsString, MinLength } from "class-validator";

export class UpdateCompanyDto {
  @IsString()
  @ApiProperty({
    required: false,
    description: "公司名称",
  })
  @IsOptional()
  @MinLength(2)
  name?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    required: false,
    description: "地址",
  })
  address?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    required: false,
    description: "联系方式",
  })
  contact?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    required: false,
    description: "传真",
  })
  fax?: string;

  @IsString()
  @IsOptional()
  @ApiProperty({
    required: false,
    description: "公司传真",
  })
  introduction?: string;
}
